package me.firstapp.module.weixin.product;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import me.firstapp.module.base.BaseEntity;

@Entity
@Table(name = "PRODUCT_PRODUCT")
public class Product extends BaseEntity {

	private static final long serialVersionUID = 6445840542893111388L;

	public static final int STATUS_OFF = 0;// 下架状态
	public static final int STATUS_ON = 1;// 上架状态

	public static final int TUIJIAN_OFF = 0;// 不推荐
	public static final int TUIJIAN_ON = 1;// 推荐

	// 种类ID
	@Column(name = "PRODUCT_CATEGORY_ID", nullable = false)
	private Long productCategoryId;

	// 种类名称
	@Column(name = "CATEGORY_NAME", length = 30, nullable = false)
	private String categoryName;

	// 供应商ID
	@Column(name = "SUPPLIER_ID", nullable = false)
	private Long supplierId;

	// 商品名称
	@Column(name = "NAME", length = 100, unique = true, nullable = false)
	private String name;

	// 商品图片链接
	@Column(name = "IMG_URL", length = 500, nullable = false)
	private String imgUrl;

	// 商品详情链接
	@Column(name = "DETAIL_URL", length = 500, nullable = false)
	private String detailUrl;

	// 商品外部链接
	@Column(name = "OUT_URL", length = 500)
	private String outUrl;

	// 单位
	@Column(name = "UNIT", length = 10, nullable = false)
	private String unit;

	// 成本
	@Column(name = "COST", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal cost;

	// 初始单位的运费，如第一斤运费是8元
	@Column(name = "START_FREIGHT", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal startFreight;

	// 每单位的运费，如每斤运费是5元
	@Column(name = "UNIT_FREIGHT", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal unitFreight;

	// 每个订单限购数量，0代表不限制
	@Column(name = "LIMIT_UNIT", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private Integer limitUnit;

	// 粉丝价
	@Column(name = "FANS_PRICE", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal fansPrice;

	// 基础会员价
	@Column(name = "BASE_VIP_PRICE", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal baseVipPrice;

	// 高级代理价
	@Column(name = "HIGH_VIP_PRICE", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal highVipPrice;

	// 上级基础会员贝币分成
	@Column(name = "CHIEF_BASE_VIP_WEI_BI", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal chiefBaseVipJinBi;

	// 上级高级代理贝币分成
	@Column(name = "CHIEF_HIGH_VIP_WEI_BI", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal chiefHighVipJinBi;

	// 上级基础会员积分分成
	@Column(name = "CHIEF_BASE_VIP_POINT", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal chiefBaseVipPoint;

	// 上级高级代理积分分成
	@Column(name = "CHIEF_HIGH_VIP_POINT", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal chiefHighVipPoint;

	// 粉丝购买，赠送给上级代理额外的贝币
	@Column(name = "FANS_BUY_GIVE_OTHER_JB", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal fansBuyGiveOtherJb;

	// 会员购买，赠送给上级代理额外的贝币
	@Column(name = "BASE_VIP_BUY_GIVE_OTHER_JB", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal baseVipBuyGiveOtherJb;

	// 代理购买，赠送给上级代理额外的贝币
	@Column(name = "HIGH_VIP_BUY_GIVE_OTHER_JB", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal highVipBuyGiveOtherJb;

	// 状态，0：下架，1：上架
	@Column(name = "STATUS", columnDefinition = "TINYINT", nullable = false)
	private Integer status;

	// 添加时间
	@Column(name = "TIME_AT", columnDefinition = "DATETIME", nullable = false)
	private Date timeAt;

	// 描述
	@Column(name = "DESCRIPTION", length = 500)
	private String description;

	// 备注
	@Column(name = "REMARK", length = 500)
	private String remark;

	// 推荐，0：否，1：是
	@Column(name = "TUI_JIAN", columnDefinition = "TINYINT", nullable = false)
	private Integer tuiJian;

	// 排序
	@Column(name = "SORT", nullable = false, columnDefinition = "TINYINT")
	private Integer sort;

	// 销售数量
	@Column(name = "SALE_COUNTS", nullable = false)
	private Long saleCounts;

	public Long getProductCategoryId() {
		return productCategoryId;
	}

	public void setProductCategoryId(Long productCategoryId) {
		this.productCategoryId = productCategoryId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getDetailUrl() {
		return detailUrl;
	}

	public void setDetailUrl(String detailUrl) {
		this.detailUrl = detailUrl;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public BigDecimal getCost() {
		return cost;
	}

	public void setCost(BigDecimal cost) {
		this.cost = cost;
	}

	public BigDecimal getStartFreight() {
		return startFreight;
	}

	public void setStartFreight(BigDecimal startFreight) {
		this.startFreight = startFreight;
	}

	public BigDecimal getUnitFreight() {
		return unitFreight;
	}

	public void setUnitFreight(BigDecimal unitFreight) {
		this.unitFreight = unitFreight;
	}

	public BigDecimal getFansPrice() {
		return fansPrice;
	}

	public void setFansPrice(BigDecimal fansPrice) {
		this.fansPrice = fansPrice;
	}

	public BigDecimal getBaseVipPrice() {
		return baseVipPrice;
	}

	public void setBaseVipPrice(BigDecimal baseVipPrice) {
		this.baseVipPrice = baseVipPrice;
	}

	public BigDecimal getHighVipPrice() {
		return highVipPrice;
	}

	public void setHighVipPrice(BigDecimal highVipPrice) {
		this.highVipPrice = highVipPrice;
	}

	public BigDecimal getChiefBaseVipJinBi() {
		return chiefBaseVipJinBi;
	}

	public void setChiefBaseVipJinBi(BigDecimal chiefBaseVipJinBi) {
		this.chiefBaseVipJinBi = chiefBaseVipJinBi;
	}

	public BigDecimal getChiefHighVipJinBi() {
		return chiefHighVipJinBi;
	}

	public void setChiefHighVipJinBi(BigDecimal chiefHighVipJinBi) {
		this.chiefHighVipJinBi = chiefHighVipJinBi;
	}

	public BigDecimal getChiefBaseVipPoint() {
		return chiefBaseVipPoint;
	}

	public void setChiefBaseVipPoint(BigDecimal chiefBaseVipPoint) {
		this.chiefBaseVipPoint = chiefBaseVipPoint;
	}

	public BigDecimal getChiefHighVipPoint() {
		return chiefHighVipPoint;
	}

	public void setChiefHighVipPoint(BigDecimal chiefHighVipPoint) {
		this.chiefHighVipPoint = chiefHighVipPoint;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getTimeAt() {
		return timeAt;
	}

	public void setTimeAt(Date timeAt) {
		this.timeAt = timeAt;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public Integer getLimitUnit() {
		return limitUnit;
	}

	public void setLimitUnit(Integer limitUnit) {
		this.limitUnit = limitUnit;
	}

	public Long getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(Long supplierId) {
		this.supplierId = supplierId;
	}

	public Integer getTuiJian() {
		return tuiJian;
	}

	public void setTuiJian(Integer tuiJian) {
		this.tuiJian = tuiJian;
	}

	public String getOutUrl() {
		return outUrl;
	}

	public void setOutUrl(String outUrl) {
		this.outUrl = outUrl;
	}

	public BigDecimal getFansBuyGiveOtherJb() {
		return fansBuyGiveOtherJb;
	}

	public void setFansBuyGiveOtherJb(BigDecimal fansBuyGiveOtherJb) {
		this.fansBuyGiveOtherJb = fansBuyGiveOtherJb;
	}

	public BigDecimal getBaseVipBuyGiveOtherJb() {
		return baseVipBuyGiveOtherJb;
	}

	public void setBaseVipBuyGiveOtherJb(BigDecimal baseVipBuyGiveOtherJb) {
		this.baseVipBuyGiveOtherJb = baseVipBuyGiveOtherJb;
	}

	public BigDecimal getHighVipBuyGiveOtherJb() {
		return highVipBuyGiveOtherJb;
	}

	public void setHighVipBuyGiveOtherJb(BigDecimal highVipBuyGiveOtherJb) {
		this.highVipBuyGiveOtherJb = highVipBuyGiveOtherJb;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public Long getSaleCounts() {
		return saleCounts;
	}

	public void setSaleCounts(Long saleCounts) {
		this.saleCounts = saleCounts;
	}

}
